﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Register;

namespace CapBanQuyen_PPTSoft
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void btnFind_Click(object sender, RoutedEventArgs e)
        {
            if(txtId.Text.Length < 4)
            {
                MessageBox.Show("Tên đăng ký phải >= 4 ký tự!","Lỗi");
                txtId.Focus();
                return;
            }
            txtSerial.Text = RegisterLib.HashCode(txtId.Text);
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            txtId.Focus();
        }
    }
}
